/*
 * Copyright (c) 2014 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

.root {
  align-items: center;
  display: flex;
  min-width: fit-content;
  white-space: nowrap;
}

.chart-root {
  position: relative;
  overflow: hidden;
}

.pie-chart-foreground {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 10;
  top: 0;
  display: flex;
  pointer-events: none;
}

.pie-chart-total {
  margin: auto;
  padding: 2px 5px;
  background-color: rgba(255, 255, 255, 0.6);
  pointer-events: auto;
}

.pie-chart-total.selected {
  font-weight: bold;
}

.chart-root .slice.selected {
  stroke: var(--selection-bg-color);
  stroke-opacity: 1;
  stroke-width: 0.04;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pie-chart-legend {
  margin-left: 30px;
}

.pie-chart-legend-row {
  margin: 5px 2px 5px auto;
  padding-right: 25px;
}

.pie-chart-legend-row.selected {
  font-weight: bold;
}

.pie-chart-legend-row[data-keyboard-focus='true']:focus {
  box-shadow: 0 0 0 2px var(--selection-bg-color) !important;
}

.pie-chart-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin: 0 6px;
  top: 1px;
  position: relative;
  border: 1px solid rgba(100, 100, 100, 0.2);
}

.pie-chart-swatch.pie-chart-empty-swatch {
  border: none;
}

.pie-chart-name {
  display: inline-block;
}

.pie-chart-size {
  display: inline-block;
  text-align: right;
  width: 70px;
}

@media (forced-colors: active) {
  .pie-chart-swatch {
    forced-color-adjust: none;
    border-color: ButtonText;
  }
  .pie-chart-total {
    forced-color-adjust: none;
    background-color: Canvas;
  }
}
